package com.aiyige.page.publish.normalvideo.adapter;

import android.view.View;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.page.publish.selecttag.model.SelectTagItem;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.LinkedList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TagAdapter extends BaseQuickAdapter<SelectTagItem, TagAdapter.ViewHolder> {

    public TagAdapter() {
        super(R.layout.tag_item, new LinkedList<SelectTagItem>());
    }

    @Override
    protected void convert(ViewHolder helper, SelectTagItem item) {
        helper.bindData(item);
    }

    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.itemTv)
        TextView itemTv;

        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bindData(SelectTagItem data) {
            itemTv.setText("#" + data.getName());
        }

    }
}
